package com.example.building_material_mannager.controller;

import com.example.building_material_mannager.entity.Customer;
import com.example.building_material_mannager.service.CustomerService;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class CustomerController {
    @Resource
    CustomerService customerService;

    //展示
    public void showCustomer(Customer customer){

        List<Customer> customers = customerService.showCustomer(customer);
        System.out.println(customers);
    }
    //增加
    public void addCustomer(Customer customer){

        boolean re = customerService.addCustomer(customer);
        System.out.println(re);
    }
    //刪除
    public void delCustomer(Integer cid){

        boolean re = customerService.delCustomer(cid);
        System.out.println(re);
    }
    //更新
    public void upCustomer(Customer customer){

        boolean re = customerService.upCustomer(customer);
        System.out.println(re);
    }
}
